﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DesktopClient
{
    public partial class NewRoom : Form
    {
        private ListBox list;
        public NewRoom(ListBox list)
        {
            InitializeComponent();
            this.list = list;
        }

        private void Add_Click(object sender, EventArgs e)
        {
            ServerProvider.ServiceSoapClient cl = new DesktopClient.ServerProvider.ServiceSoapClient();
            cl.AddRoom(roomName.Text);
            list.Items.Add(roomName.Text);
            this.Close();
        }
    }
}
